package com.cmc.cloud.cmclink.doc.convert;

import java.util.List;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import com.cmc.cloud.cmclink.doc.api.document.rep.BlnoFreightDetailDto;
import com.cmc.cloud.cmclink.doc.entity.BlnoFreightDetailDO;
import com.cmc.cloud.cmclink.doc.entity.ConfirmNoticeFcnDO;
import com.cmc.cloud.cmclink.doc.vo.blnofreightvo.BlnoFreightDetailRespVO;

/**
 * @author lzp
 */
@Mapper
public interface BlnoFreightDetailConvert {
    BlnoFreightDetailConvert INSTANCE = Mappers.getMapper(BlnoFreightDetailConvert.class);

    /**
     * 属性转换
     *
     * @param blnoFreightDetailDoList
     * @return
     */
    List<BlnoFreightDetailDto> convertBlnoFreightDetailDto(List<BlnoFreightDetailDO> blnoFreightDetailDoList);

    /**
     * 属性转换
     *
     * @param list list
     * @return list
     */
    List<BlnoFreightDetailRespVO> convertList(List<BlnoFreightDetailDO> list);

    /**
     * 属性转换
     *
     * @param list list
     * @return list
     */
    @Mappings({@Mapping(target = "id", ignore = true)})
    List<ConfirmNoticeFcnDO> convertFcnList(List<BlnoFreightDetailDO> list);

    /**
     * 属性转换
     *
     * @param freightDetail freightDetail
     * @return list
     */
    @Mappings({@Mapping(target = "id", ignore = true)})
    ConfirmNoticeFcnDO convert(BlnoFreightDetailDO freightDetail);
}
